//
//  WoundDesCell.m
//  WSJWoundDesVC
//
//  Created by wsj2015 on 16/3/30.
//  Copyright © 2016年 wsj2015. All rights reserved.
//

#import "WoundDesCell.h"

@implementation WoundDesCell

- (void)awakeFromNib {
    // Initialization code
    [self.selectBtn setImage:[UIImage imageNamed:@"evaluation_unselected"] forState:UIControlStateNormal];
    [self.selectBtn setImage:[UIImage imageNamed:@"evaluation_selected"] forState:UIControlStateSelected];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)selectActon:(UIButton *)sender {
    sender.selected = !sender.selected;
    
    if (self.model.readonly ==NO) {
        if (sender.selected ) {
            self.contentLabel.textColor = [UIColor blackColor];
        }else{
            self.contentLabel.textColor = [UIColor grayColor];
        }
    }
    
    if (self.btnBlock) {
        self.btnBlock(sender.selected);
    }
}
-(void)setModel:(WoundContentModel *)model{
    [super setModel:model];
        self.contentLabel.text = model.content;
        self.selectBtn.selected = model.isSelect;
        if (!model.isSelect &&model.readonly ==NO) {
            self.contentLabel.textColor = [UIColor grayColor];
        }else{
            self.contentLabel.textColor = [UIColor blackColor];
           
            
        }
    
    
    
}
@end
